1. Field of the Invention
The present invention relates to a printer and a printer driver for printing symbols containing specific information. Typical of such symbols are one-dimensional bar codes and two-dimensional codes. There are two general types of two-dimensional codes: “stacked” or “multi-row” codes in which plural one-dimensional bar codes are stacked in vertical alignment, and matrix codes. Matrix codes set the intersections of a code matrix to black or white to encode information, and thus differ fundamentally from conventional one-dimensional bar codes. The present invention primarily relates to a printer and to a printer driver for printing two-dimensional codes.
It should be noted that the term “symbol” as used herein refers to the one-dimensional bar code or two-dimensional code that is printed. In addition, the information (content) that the symbol encodes and represents is referred to as the “display data.”
2. Description of the Related Art
One-dimensional bar codes are one of today's most commonly used symbols. They are typically used to encode a product number and other information, and are readily found on products sold at retail.
Two-dimensional codes, however, have grown in use because of their ability to encode significantly more information. One-dimensional bar codes, for example, contain one line of information presented in a vertical or horizontal sequence. A stacked two-dimensional code, on the other hand, contains plural, vertically-aligned rows of one-dimensional bar codes, and matrix codes encode information by setting the intersections of the code matrix to black or white (on or off) according to specific rules.
Code 49, Code 16K, PDF417, SuperCode, and Ultracode are examples of stacked two-dimensional codes. VeriCode, Data Matrix (ECC000-140, ECC200, and others), CP Code, MaxiCode, Code 1, QR Code, QR Code Model II, and Aztec Code are examples of two-dimensional matrix codes. Features common to two-dimensional codes include (1) the ability to display (encode) significantly more data compared with one-dimensional bar codes, (2) omnidirectional reading (the reading direction is not restricted), (3) the ability to encode binary information, and (4) improved reading accuracy and security (data error detection and correction).
A typical one-dimensional bar code uses a combination of bars and spaces (the intervals between bars) to display particular information (the display data). The bar code can be read using a bar code scanner to restore the information to a human-readable form. Printing a bar code therefore requires the to-be-displayed information to first be converted to a bar code pattern, which the printer then prints. This is also the case with matrix symbols. That is, to display particular information with a combination of black and white pixels in a matrix symbol, the information to be displayed (the display data) must first be converted to the matrix code pattern, i.e., the symbol, which the printer then prints.
To encode information to a symbol for printing, the display data must be first converted to a specific code according to a specific symbol protocol and then printed. It is important to note that conversion to a two-dimensional code symbol involves more than a simple code conversion. More specifically, code conversion requires, for example, adding a start code and stop code before and after the display data, including error correction code, data compression, and other steps defined by the specific protocol for the type of symbol used. The coding process used for two-dimensional codes is therefore complex because of not only the large amount of information that can be displayed, but also due to the compression and error correction coding operations that are required.
Conventionally these symbols are generated by an application running on a host computer performing a process for converting the display data to the bit pattern of the symbol (simply called “symbol bit pattern” below), and then sending the resulting bit pattern to a printer as the print data. The symbol is then printed. Symbols can thus be printed with the printer performing a normal printing process, that is, simply printing the bit pattern data received from the host computer.
As noted above, the process for converting display data to the symbol that will actually be printed requires converting the display data and other processes that are selectively applied based on the specific type of symbol. For example, data compression and error correction code (ECC) generation are also required to generate a PDF417 symbol, one type of two-dimensional code. Furthermore, the PDF417 protocol allows three different user-selectable data compression modes, and nine (0 to 8) user-selectable ECC levels.
The size (height and width dimensions) of the printed symbol therefore varies according to the specific content and amount of data to be encoded in the symbol because of the plural compression modes and nine different ECC levels that can be used. This means that the size of the final printed symbol is not known until the bit pattern is actually generated.
Print data, including symbols such as those described above, must usually fit within a defined printing area or print frame. However, the size of the two-dimensional code symbol to be printed may not be known until the actual bit pattern is generated for printing. Furthermore, the size of the printed symbol differs according to the printer resolution even if the bit pattern data is the same. Thus, there is a need to be able to confirm before printing begins whether the generated symbol can be printed within the defined print area.